{extend name="./public/base"/}
{block name="alt"}广告管理{/block}
{block name="alter"}修改广告视频{/block}
{block name="title"}BangBang修改广告{/block}
{block name="main"}

<div class="row">
                    <div class="col-6">
                        <div class="card">
                            <div class="card-block">
                                <div class="card-body">
                                	<h3>选择您要投放的广告视频</h3>
                 					
                	
                	<input type="hidden" name="vid" value="" >
                	
<div class="form-group">
    <label for="inputPassword" class="col-sm-4 control-label">视频类型</label>
    <div class="col-sm-10">
      <select name="tid" id="tid" class="form-control">
      	{volist name="types" id="ty"}
      	<option value="{$ty.tid}">{$ty.typename}</option>
      	{/volist}
      </select>
    </div>
  </div>
  {volist name="datas" id="da"}
  <input type="hidden" value="{$da.aid}" id="aid">
  {/volist}
  <div class="form-group">
    <label for="inputPassword" class="col-sm-4 control-label">视频名称</label>
    <div class="col-sm-10">
      <input type="text" name="vname" class="form-control" id="vname" >
    </div>
  </div>
 
  <button type="button" id="button" class="btn btn-primary">搜索</button>

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
               <!-- -->

				<div class="row">
                    <div class="col-10">
                        <div class="card">
                            <div class="card-block">
                                <div class="card-body">
                                <h3>选择以下视频替换原视频</h3>
                                
                                	<div id="tr">
                                    
                                  </div>
                               
                                	
                                </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>


<script src="__STATIC__/assets/plugins/jquery/jquery.min.js"></script>
                <script>
                	$(function(){
			 $("#button").click(function(){
			 	$.get("{:url('http://localhost/bangbang/public/index.php/superadmin/newer/show')}",{tid:$("#tid").val(),vname:$("#vname").val(),aid:$("#aid").val()},function(data){
			         // $('#building').html(data);});	
			         console.log(data);
			         // $('.card-body').html(data['vid']);
			        //  var output=``;
			        //  for(var i in data){
			        //  	// console.log(data[i].vid);
			        //  	// $('#tr').html('<td>'+data[i].vid+'</td>')
           //      var a=data[i].vid
           //       console.log(a);
			        //  	// output+=`<div>${data[i].vid}</div>`
           //      output+=`<div id="user">

           //                <a href="{:url('change')}"> <img src="__STATIC__/videopic/${data[i].pic}" alt="" width="150" height="150px"/></a>
           //                <p class="zzz">视频名:${data[i].videoname}</p>
           //                 <p class="zzz">上传人:${data[i].uploadadmin}</p>
           //               </div>`
			        	
			        // }
			         $('#tr').html(data);
			        });
			 	});
			 })


                </script>


{/block}